package com.ftg.learn.remote;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * 远程数据访问
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/5/23 上午8:34
 */
@Repository
public class RabcHelloRemote {

    @Resource
    RestTemplate restTemplate;

    /**
     * rbacservice  多个实例 (ip   port)
     * @return
     */
    public String remoteHello() {
        return restTemplate.getForObject("http://rbacservice/hello",String.class);
    }

}
